# -*- coding: utf-8 -*-

# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
from pymongo import MongoClient

class Ziru003Pipeline(object):
    def process_item(self, item, spider):
        print('------------', item)
        client = MongoClient('127.0.0.1', 27017)
        self.collection = client['ziru']['t1']
